package org.springblade.modules.repair.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.annotation.TenantIgnore;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 维修报告发送记录
 */
@Data
@TableName(value = "blade_maintain_report_send")
public class MaintainReportSend implements Serializable {

	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "主键id")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 创建人
	 */
	@TableField(value = "create_user")
	private Long createUser;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "create_time")
	private Date createTime;

    /**
     * 报告ID
     */
    @TableField(value = "report_id")
    private Long reportId;

    /**
     * 1-小程序卡片 2-PDF 3-图片
     */
    @TableField(value = "content_type")
    private Integer contentType;

    /**
     * 是否绑定机器人 1-是 2-否
     */
    @TableField(value = "robot_status")
    private Integer robotStatus;

	/**
	 * 状态 1-已发送 2-发送失败
	 */
	@TableField(value = "`status`")
	private Integer status;

	/**
	 * 发送人名称
	 */
	@TableField(exist = false)
	private String userName;

	/**
	 * 发送人角色名称
	 */
	@TableField(exist = false)
	private String roleName;

}
